(function (window, document) {
  var domElement = document.documentElement,
    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
    setRem = function () {
      var clientWidth = domElement.clientWidth;
      if (!clientWidth) return;
      if (clientWidth >= 750) {
        domElement.style.fontSize = '100px';
      } else {
        domElement.style.fontSize = 100 * (clientWidth / 750) + 'px';
      }
    };
  setRem();
  window.addEventListener(resizeEvt, setRem, false);
  document.addEventListener('DOMContentLoaded', setRem, false);
})(window, document)
